const mongoose = require("mongoose");
const data = require("../data/data.json")
let db = mongoose.connect("mongodb://127.0.0.1:27017/wodedb", function (err) {
    if (err) {
        return console.log(err);
    }
    // console.log("链接成功");
})

let schema = mongoose.Schema({
    title: String,
    content: String,
    addTime: String,
    country: String,
    type: String,
    imgUrl: String,
})
let User = mongoose.model("news", schema,)
// User.create(data)
// console.log(User);
module.exports = User;